<script setup lang="ts">
import navbar from "@/components/common/navbar/index.vue";
import { onMounted, ref } from "vue";

const type = ref("car");
onMounted(() => {
  type.value = import.meta.env.VITE_APP_CAR_OR_OLDMAN;
});
</script>

<template>
  <div class="wrapper">
    <div class="header">
      <navbar>
        <template #default>
          <template v-if="type === 'car'">
            <router-link to="/car/car-mall">汽车商城</router-link>
            <router-link to="/car/community">社区</router-link>
            <router-link to="/car/order-management">工单管理</router-link>
          </template>
          <template v-else>
            <router-link to="/oldman/health">健康管理</router-link>
            <router-link to="/oldman/community">社区</router-link>
            <router-link to="/oldman/trip">行程管理</router-link>
            <router-link to="/oldman/consultation">专家咨询</router-link>
            <router-link to="/oldman/activities">活动管理</router-link>
            <router-link to="/oldman/yanglaoyuan">养老院</router-link>
            <router-link to="/oldman/hugong">护工信息</router-link>
            <router-link to="/oldman/medicine">药品管理</router-link>
          </template>
        </template>
        <template #modal1>
          <cart />
        </template>
      </navbar>
    </div>
    <router-view></router-view>
  </div>
</template>

<style scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
.router-view-wrapper {
  width: 100%;
  height: 100%;
}
</style>
